<?php
class TestController extends Controller
{
	public $aa = "sasjaks";
	public function genString()
	{
		return "123";
	}
	public function actionIndex()
	{
/* 		$d = self::genString();
		parent::llog($d.$this->aa,"Test.Index");
		// renders the view file 'protected/views/site/index.php'
		// using the default layout 'protected/views/layouts/main.php'
		$readJsonPost = Trans::readJsonPost();
		$posttest = $_POST;
		$this->renderPartial('json', array(
            'jsonArr'=>array(
                'sessionId' => 122344,
                'SMSFormat' => 'agasfgg',
            	'readJsonPost'=>$readJsonPost,
            	'posttest' =>$posttest
                )
            )); */
		
		
		$result;
/* 		$model=new Test();
		$model->name = "text22";
		$model->save(); */
		$result=array();
		$criteria = new CDbCriteria;
		$criteria->limit = 3;
		$criteria->offset = 1;
		$modelList = Test::model()->findAll($criteria);
		$redisObj = Config::getRedisClient();
		$redisObj->set('library', 'predis11111');
		foreach($modelList as $model){

			$result[]=$model->attributes;
		}
		
		$this->renderPartial('json',array(
				'result'=>$result,
				));
		
	}
}